import Vue from 'vue'
import imgUpload from './imgUpLoad'
import querySearch from './querySearch'
import newfileUp from './newfileUp'
import img from './image'
import container from './container'
import title from './title'
import table from './table'
import imgPreview from './imgPreview'
import baseSelect from './baseSelect'

const components = {
  'img-upload': imgUpload,
  'query-search': querySearch,
  'new-file-up': newfileUp,
  'img': img,
  'container': container,
  'title': title,
  'table': table,
  'img-preview': imgPreview,
  'base-select': baseSelect
}
console.log('components-----', components)
// 將引入的所有公共組建挂載到vue中使用時加w-組建名
Vue.use({
  install: Vue => {
    Object.keys(components).forEach(key => {
      Vue.component(`w-${key}`, components[key])
    })
  }
})
